<template>
  <el-dialog title="新增员工" :visible.sync="dialogShow" @close="">
    <!-- ! 绘制表单 -->
    <el-form :model="formData" :rules="formRules" ref="form" label-width="140px">
      <el-form-item label="姓名" prop="username" size="normal">
        <el-input v-model="formData.username" style="width: 320px"></el-input>
      </el-form-item>
      <el-form-item label="手机" prop="mobile" size="normal">
        <el-input v-model="formData.mobile" style="width: 320px"></el-input>
      </el-form-item>
      <el-form-item label="入职时间" prop="timeOfEntry" size="normal">
        <el-date-picker v-model="formData.timeOfEntry" style="width: 320px"></el-date-picker>
      </el-form-item>
      <el-form-item label="聘用形式" prop="formOfEmployment" size="normal">
        <el-select v-model="formData.formOfEmployment" style="width: 320px">
          <el-option v-for="item in hireType" :key="item.id" :label="item.value" :value="item.id"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="工号" prop="workNumber" size="normal">
        <el-input v-model="formData.workNumber" style="width: 320px"></el-input>
      </el-form-item>
      <el-form-item label="部门" prop="departmentName" size="normal">
        <el-input v-model="formData.departmentName" style="width: 320px"></el-input>
      </el-form-item>
      <el-form-item label="转正时间" prop="correctionTime" size="normal">
        <el-date-picker v-model="formData.correctionTime" style="width: 320px"></el-date-picker>
      </el-form-item>
    </el-form>
  </el-dialog>
</template>
<script>
import EmployeesEnum from "@/api/constant/employees";
export default {
  name: "addEmployees",
  data() {
    return {
      // 三个变量
      // 弹框控制变量
      dialogShow: false,
      // 表单数据变量
      formData: {
        username: "",
        mobile: "",
        formOfEmployment: "",
        workNumber: "",
        departmentName: "",
        timeOfEntry: "",
        correctionTime: "",
      },
      // 表单规则变量
      formRules: {},
      // 聘用形式
      hireType: EmployeesEnum.hireType,
    };
  },
};
</script>
<style></style>
